//
//  TTPointProbabilityMap.m
//  iBeaconDemo
//
//  Created by cry on 17/1/9.
//  Copyright © 2017年 eGova. All rights reserved.
//

#import "TTPointProbabilityMap.h"

@implementation TTPointProbabilityMap

/** The rssi value in this point. */
//private double rssiValue;

/**
 * Instantiates a new PointProbabilityMap.
 *
 * @param x the x coordinate of the point
 * @param y the y coordinate of the point
 * @param rssiValue the rssi value in this point
 */
//public PointProbabilityMap(double x, double y, double rssiValue) {
//    super(x, y);
//    this.rssiValue = rssiValue;
//}
- (instancetype)initWithX:(double)x Y:(double)y rssiValue:(double)rssiValue{
    
    if (self = [super initWithX:x Y:y]) {
        self.rssiValue = rssiValue;
    }
    return self;
}

/**
 * Gets the rssi value in this point.
 *
 * @return the rssi value
 */
//public double getRSSIValue() {
//    return this.rssiValue;
//}

/**
 * Sets the rssi value in this point.
 *
 * @param rssiValue the new rssi value
 */
//public void setRSSIValue(double rssiValue) {
//    this.rssiValue = rssiValue;
//}

/**
 * Represents a string of this point.
 *
 * @return a string
 */
//public String toString() {
//    return "[" + this.getX() + ";" + this.getY() + "] - rssi = " + this.rssiValue;
//}
- (NSString *)description{
    return [NSString stringWithFormat:@"%@ - rrsi = %lf",[super description],self.rssiValue];
}

- (NSComparisonResult)compareByX:(TTPointProbabilityMap *)point{
    
    if (self.x < point.x) {
        return NSOrderedAscending;
    }else{
        return NSOrderedDescending;
    }
}

@end
